# Replication: All in this together

This replication file contains all the files and data necessary for the replication of: All in this together? A preregistered report on deservingness of government aid during the COVID-19 pandemic (Frontiers in Political Science 2021)

To reproduce the analyses there are two options: with or without the renv package. The renv offers a more stable version of the replication with a point-in-time capture of the libraries and packages required as they were at the time of publication.

With renv:
* Open deservingness.Rproj with RStudio
* Run the command renv::restore() to install/link to all the necessary packages. This may take some time.
* Run main.Rmd to produce all tables and figures for the paper

Without renv:
* Download all files from the Harvard Dataverse
* Open deservingness.Rproj in RStudio
* Run main.Rmd to produce all tables and figures for the paper. Again, you may need to install packages that you do not already have and subsequent package changes may break the code.

## Data

The data directory contains the following files with variables as described:

* study1.csv
  * id: respondent id
  * respondent_gender: Male or Female
  * respondent_marital: Not married or Married
  * respondent_employment: At risk/laid off or Not at risk, regrouped from (Yes, Maybe, No, Laid Off)
  * respondent_children: Children or No children, regrouped from (0-4, More than 4)
  * respondent_income: Low, Medium, or High income based on recode of total household income < 60k, 60 -90k, > 90k
  * respondent_health: 0 or 1, with 1 indicating self-reported COVID-19 symptoms by respondent
  * respondent_health_oth: 0 or 1, with 1 indicating self-reported COVID-19 symptoms for a member of household
  * respondent_comb_health: 0 or 1, 1 if either respondent_health or respondent_health_oth is 1
  * vignette_num: each respondent saw four vignettes
  * vignette_allocation: amount in Canadian dollars allocated to the vignette (0-4000)
  * vignette_gender: vignette gender either Male or Female
  * vignette_citizen: vignette citizenship one of Not a citizen, Citizen born in Canada, Citizen not born in Canada
  * vignette_health: vignette health either Healthy or poor health
  * vignette_marital: vignette marital status either Married or Single
  * vignette_children: vignette children one of No children, Children under 5, (Children between the ages of) 5-12, (Children) Over 12
  * vignette_employment: vignette employment status one Employed full-time, Employed, reduced income, Unemployed, Unemployed due to the pandemic
  * vignette_income: vignette annual income in 2019 status one of \$30k, \$60k, \$90k, \$120k
  * vignette_ethnicity: vignette ethnicity derived from vignette name, one of East Asian, Indigenous, South Asian, White
  
* study2.csv
  * id: respondent id
  * duration: amount of time spent completing survey (seconds)
  * condition: either GST or COVID-19 (randomly assigned)
  * vignette_num: each respondent saw four vignettes
  * vignette_allocation: amount in Canadian dollars allocated to the vignette (free entry)
  * vignette_deservingness: subjective evaluation of vignette deservingness by respondent (0-10)
  * vignette_similarity: subjective evaluation of vignette similarity to the respondent by the respondent (0-10)
  * vignette_gender: vignette gender either Male or Female
  * vignette_citizen: vignette citizenship one of Not a citizen, Citizen born in Canada, Citizen not born in Canada
  * vignette_health: vignette health either Healthy or poor health
  * vignette_marital: vignette marital status either Married or Single
  * vignette_children: vignette children either No children or Children under 5
  * vignette_employment: vignette employment status one Employed full-time, Underemployed, Unemployed
  * vignette_income: vignette annual income in 2019 status one of \$30k, \$60k, \$90k, \$120k
  * vignette_ethnicity: vignette ethnicity derived from vignette name and explicit prompt, one of East Asian, Indigenous, South Asian, White
  * gov_cerb: respondent support for CERB (Canada Emergency Response Benefit) program (1-5 with 5 being strongly support)
  * gov_cews: respondent support for CEWS (Canada Emergency Wage Subsidy) program (1-5 with 5 being strongly support)
  * gov_cesb: respondent support for CESB (Canada Emergency Student Benefit) program (1-5 with 5 being strongly support)
  * gov_tex: respondent support for Universal cash transfers to individuals through tax rebates (1-5 with 5 being strongly support)
  * gov_ccb: respondent support for CCB (Canada Child Benefits) program (1-5 with 5 being strongly support)
  * gov_ei: respondent support for Enhanced and extended Employment Insurance Benefits (1-5 with 5 being strongly support)
  * gov_support: respondent support for Increased deficits and debt to finance economic support programs (1-5 with 5 being strongly support)
  * get_ahead: respondent agreement with "People who don't get ahead should blame themselves, not the system" (1-5 with 5 being strongly disagree)
  * inequality: respondent agreement with "The government should take measures to reduce differences in income levels" (1-5 with 5 being strongly agree)
  * living: respondent agreement with "The government should see to it that everyone has a decent standard of living" (1-5 with 5 being strongly agree)
  
* study2_alt.csv
  * id: respondent id
  * duration: amount of time spent completing survey (seconds)
  * condition: either GST or COVID-19 (randomly assigned)
  * vignette_num: each respondent saw four vignettes
  * vignette_allocation: amount in Canadian dollars allocated to the vignette (free entry)
  * vignette_deservingness: subjective evaluation of vignette deservingness by respondent (0-10)
  * vignette_similarity: subjective evaluation of vignette similarity to the respondent by the respondent (0-10)
  * vignette_gender: vignette gender either Male or Female
  * vignette_citizen: vignette citizenship one of Not a citizen, Citizen born in Canada, Citizen not born in Canada
  * vignette_health: vignette health either Healthy or poor health
  * vignette_marital: vignette marital status either Married or Single
  * vignette_children: vignette children either No children or Children under 5
  * vignette_employment: vignette employment status one Employed full-time, Underemployed, Unemployed
  * vignette_income: vignette annual income in 2019 status one of \$30k, \$60k, \$90k, \$120k
  * vignette_ethnicity: vignette ethnicity derived from vignette name, one of East Asian, Indigenous, South Asian, White
